#include "Frm02.h"

Frm02::Frm02(HmiApp* app, STTWidget *par, const string& id, const string& desc) : STTPage(app->getRuntime(), par, id, desc) {
	hmiApp = app;
}

Frm02::~Frm02() {
}

void Frm02::onInit() {

}

void Frm02::createParts() {
	setMainArg(0, 0, 1024, 600);
	setMainStyle(0, 0xffffff, 0xffffff, 0, 255, 0, 0xc0c0c0);

	/*----------------------------- Panel : wMPanel1                     -----------------------------*/
	wMPanel1 = new STTPanel(p_rt, this, "wMPanel1");
	wMPanel1->setMainArg(283, 275, 457, 295, 0);
	wMPanel1->setMainStyle(0, 0xffffff, 0xffffff, GradDir::NONE, 255, 1, 0xc0c0c0);

	/*----------------------------- Label : wMLabel1                     -----------------------------*/
	wMLabel1 = new STTLabel(p_rt, wMPanel1, "wMLabel1");
	wMLabel1->setMainArg(60, 45, 159, 60, "标签", TextAlign::LEFT, LabelLongMode::CLIP, 30);
	wMLabel1->setFonts(0xffff, 16, "文泉驿微米黑", 0);
	wMLabel1->setMainStyle(0, 0xff, 0xffffff, GradDir::NONE, 2, 0x0, 140);
	wMLabel1->setFormatText(TextAlign::LEFT, LabelLongMode::CLIP, 30);

	/*----------------------------- Text : wMText1                       -----------------------------*/
	wMText1 = new STTTextArea(p_rt, wMPanel1, "wMText1");
	wMText1->setMainArg(30, 198, 329, 35, false, true, TextAlign::CENTER, -1, -1, -99999999, 99999999, false);
	wMText1->setMainStyle(7, 0xffffff, 0xffffff, 0, 2, 0xc0c0c0, 4, 0, 4, 4, 255);
	wMText1->setPlaceholderText("")->setMaxLength(0)->setAcceptedChars("")->setImeMode(IME::UC);
	wMText1->setFont(0x0, 16, "文泉驿微米黑", 0);

	/*----------------------------- Label : wMLabel2                     -----------------------------*/
	wMLabel2 = new STTLabel(p_rt, wMPanel1, "wMLabel2");
	wMLabel2->setMainArg(383, 267, 47, 16, "标签", TextAlign::LEFT, LabelLongMode::CLIP, 30);
	wMLabel2->setFonts(0x0, 16, "文泉驿微米黑", 0);
	wMLabel2->setMainStyle(0, 0xffffff, 0xffffff, GradDir::NONE, 0, 0x0, 0);
	wMLabel2->setFormatText(TextAlign::LEFT, LabelLongMode::CLIP, 30);

	/*----------------------------- Button : wMButton21                  -----------------------------*/
	wMButton21 = new STTButton(p_rt, wMPanel1, "wMButton21", 0);
	wMButton21->setMainArg(294, 105, 98, 48, false);
	wMButton21->setPressedArg("click me!", 0x0, "文泉驿微米黑", 16, 0);
	wMButton21->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton21->setReleasedArg("click me!", 0x0, "文泉驿微米黑", 16, 0);
	wMButton21->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton21->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton21_clk_cb);

	/*----------------------------- MButton : wMMButton1                 -----------------------------*/
	wMMButton1 = new STTButton(p_rt, this, "wMMButton1", 1);
	wMMButton1->setMainArg(0, 0, 100, 50, false);
	wMMButton1->setImg("1", "./images/arrow_34_100X50.gray.svg", "");
	wMMButton1->setImg("0", "./images/arrow_34_100X50.svg", "");
	wMMButton1->bindOpenFormHandler(Event::CLICKED, "Frm01", PageMode::NEWWIN, NULL);

	/*----------------------------- Button : wMButton1                   -----------------------------*/
	wMButton1 = new STTButton(p_rt, this, "wMButton1", 0);
	wMButton1->setMainArg(101, 1, 98, 48, false);
	wMButton1->setPressedArg("setMainArg", 0x0, "文泉驿微米黑", 16, 0);
	wMButton1->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton1->setReleasedArg("setMainArg", 0x0, "文泉驿微米黑", 12, 0);
	wMButton1->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton1->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton1_clk_cb);

	/*----------------------------- Button : wMButton2                   -----------------------------*/
	wMButton2 = new STTButton(p_rt, this, "wMButton2", 0);
	wMButton2->setMainArg(201, 1, 98, 48, false);
	wMButton2->setPressedArg("setMainStyle", 0x0, "文泉驿微米黑", 16, 0);
	wMButton2->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton2->setReleasedArg("setMainStyle", 0x0, "文泉驿微米黑", 12, 0);
	wMButton2->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton2->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton2_clk_cb);

	/*----------------------------- Button : wMButton3                   -----------------------------*/
	wMButton3 = new STTButton(p_rt, this, "wMButton3", 0);
	wMButton3->setMainArg(301, 1, 98, 48, false);
	wMButton3->setPressedArg("setBgImg", 0x0, "文泉驿微米黑", 16, 0);
	wMButton3->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton3->setReleasedArg("setBgImg", 0x0, "文泉驿微米黑", 12, 0);
	wMButton3->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton3->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton3_clk_cb);

	/*----------------------------- Button : wMButton4                   -----------------------------*/
	wMButton4 = new STTButton(p_rt, this, "wMButton4", 0);
	wMButton4->setMainArg(401, 1, 98, 48, false);
	wMButton4->setPressedArg("EventHandler", 0x0, "文泉驿微米黑", 16, 0);
	wMButton4->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton4->setReleasedArg("EventHandler", 0x0, "文泉驿微米黑", 12, 0);
	wMButton4->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton4->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton4_clk_cb);

	/*----------------------------- Button : wMButton5                   -----------------------------*/
	wMButton5 = new STTButton(p_rt, this, "wMButton5", 0);
	wMButton5->setMainArg(501, 1, 98, 48, false);
	wMButton5->setPressedArg("bindData", 0x0, "文泉驿微米黑", 16, 0);
	wMButton5->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton5->setReleasedArg("bindData", 0x0, "文泉驿微米黑", 12, 0);
	wMButton5->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton5->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton5_clk_cb);

	/*----------------------------- Button : wMButton6                   -----------------------------*/
	wMButton6 = new STTButton(p_rt, this, "wMButton6", 0);
	wMButton6->setMainArg(601, 1, 98, 48, false);
	wMButton6->setPressedArg("addFlag", 0x0, "文泉驿微米黑", 16, 0);
	wMButton6->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton6->setReleasedArg("addFlag", 0x0, "文泉驿微米黑", 12, 0);
	wMButton6->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton6->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton6_clk_cb);

	/*----------------------------- Button : wMButton7                   -----------------------------*/
	wMButton7 = new STTButton(p_rt, this, "wMButton7", 0);
	wMButton7->setMainArg(701, 1, 98, 48, false);
	wMButton7->setPressedArg("setHidden", 0x0, "文泉驿微米黑", 16, 0);
	wMButton7->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton7->setReleasedArg("setHidden", 0x0, "文泉驿微米黑", 12, 0);
	wMButton7->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton7->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton7_clk_cb);

	/*----------------------------- Button : wMButton8                   -----------------------------*/
	wMButton8 = new STTButton(p_rt, this, "wMButton8", 0);
	wMButton8->setMainArg(801, 1, 98, 48, false);
	wMButton8->setPressedArg("setEnable", 0x0, "文泉驿微米黑", 16, 0);
	wMButton8->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton8->setReleasedArg("setEnable", 0x0, "文泉驿微米黑", 12, 0);
	wMButton8->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton8->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton8_clk_cb);

	/*----------------------------- Button : wMButton9                   -----------------------------*/
	wMButton9 = new STTButton(p_rt, this, "wMButton9", 0);
	wMButton9->setMainArg(901, 1, 98, 48, false);
	wMButton9->setPressedArg("setClickable", 0x0, "文泉驿微米黑", 16, 0);
	wMButton9->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton9->setReleasedArg("setClickable", 0x0, "文泉驿微米黑", 12, 0);
	wMButton9->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton9->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton9_clk_cb);

	/*----------------------------- Button : wMButton10                  -----------------------------*/
	wMButton10 = new STTButton(p_rt, this, "wMButton10", 0);
	wMButton10->setMainArg(101, 51, 98, 48, false);
	wMButton10->setPressedArg("setScrollable", 0x0, "文泉驿微米黑", 16, 0);
	wMButton10->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton10->setReleasedArg("setScrollable", 0x0, "文泉驿微米黑", 12, 0);
	wMButton10->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton10->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton10_clk_cb);

	/*----------------------------- Button : wMButton11                  -----------------------------*/
	wMButton11 = new STTButton(p_rt, this, "wMButton11", 0);
	wMButton11->setMainArg(201, 51, 98, 48, false);
	wMButton11->setPressedArg("addState", 0x0, "文泉驿微米黑", 16, 0);
	wMButton11->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton11->setReleasedArg("addState", 0x0, "文泉驿微米黑", 12, 0);
	wMButton11->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton11->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton11_clk_cb);

	/*----------------------------- Button : wMButton12                  -----------------------------*/
	wMButton12 = new STTButton(p_rt, this, "wMButton12", 0);
	wMButton12->setMainArg(301, 51, 98, 48, false);
	wMButton12->setPressedArg("setPos", 0x0, "文泉驿微米黑", 16, 0);
	wMButton12->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton12->setReleasedArg("setPos", 0x0, "文泉驿微米黑", 12, 0);
	wMButton12->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton12->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton12_clk_cb);

	/*----------------------------- Button : wMButton13                  -----------------------------*/
	wMButton13 = new STTButton(p_rt, this, "wMButton13", 0);
	wMButton13->setMainArg(401, 51, 98, 48, false);
	wMButton13->setPressedArg("setX", 0x0, "文泉驿微米黑", 16, 0);
	wMButton13->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton13->setReleasedArg("setX", 0x0, "文泉驿微米黑", 12, 0);
	wMButton13->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton13->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton13_clk_cb);

	/*----------------------------- Button : wMButton14                  -----------------------------*/
	wMButton14 = new STTButton(p_rt, this, "wMButton14", 0);
	wMButton14->setMainArg(501, 51, 98, 48, false);
	wMButton14->setPressedArg("setY", 0x0, "文泉驿微米黑", 16, 0);
	wMButton14->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton14->setReleasedArg("setY", 0x0, "文泉驿微米黑", 12, 0);
	wMButton14->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton14->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton14_clk_cb);

	/*----------------------------- Button : wMButton15                  -----------------------------*/
	wMButton15 = new STTButton(p_rt, this, "wMButton15", 0);
	wMButton15->setMainArg(601, 51, 98, 48, false);
	wMButton15->setPressedArg("setSize", 0x0, "文泉驿微米黑", 16, 0);
	wMButton15->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton15->setReleasedArg("setSize", 0x0, "文泉驿微米黑", 12, 0);
	wMButton15->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton15->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton15_clk_cb);

	/*----------------------------- Button : wMButton16                  -----------------------------*/
	wMButton16 = new STTButton(p_rt, this, "wMButton16", 0);
	wMButton16->setMainArg(701, 51, 98, 48, false);
	wMButton16->setPressedArg("setWidth", 0x0, "文泉驿微米黑", 16, 0);
	wMButton16->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton16->setReleasedArg("setWidth", 0x0, "文泉驿微米黑", 12, 0);
	wMButton16->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton16->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton16_clk_cb);

	/*----------------------------- Button : wMButton17                  -----------------------------*/
	wMButton17 = new STTButton(p_rt, this, "wMButton17", 0);
	wMButton17->setMainArg(801, 51, 98, 48, false);
	wMButton17->setPressedArg("setHeight", 0x0, "文泉驿微米黑", 16, 0);
	wMButton17->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton17->setReleasedArg("setHeight", 0x0, "文泉驿微米黑", 12, 0);
	wMButton17->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton17->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton17_clk_cb);

	/*----------------------------- Button : wMButton18                  -----------------------------*/
	wMButton18 = new STTButton(p_rt, this, "wMButton18", 0);
	wMButton18->setMainArg(901, 51, 98, 48, false);
	wMButton18->setPressedArg("setContextWidth", 0x0, "文泉驿微米黑", 16, 0);
	wMButton18->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton18->setReleasedArg("setContextWidth", 0x0, "文泉驿微米黑", 12, 0);
	wMButton18->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton18->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton18_clk_cb);

	/*----------------------------- Button : wMButton19                  -----------------------------*/
	wMButton19 = new STTButton(p_rt, this, "wMButton19", 0);
	wMButton19->setMainArg(101, 100, 98, 48, false);
	wMButton19->setPressedArg("setContextHeight", 0x0, "文泉驿微米黑", 16, 0);
	wMButton19->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton19->setReleasedArg("setContextHeight", 0x0, "文泉驿微米黑", 12, 0);
	wMButton19->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton19->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton19_clk_cb);

	/*----------------------------- Button : wMButton20                  -----------------------------*/
	wMButton20 = new STTButton(p_rt, this, "wMButton20", 0);
	wMButton20->setMainArg(202, 100, 98, 48, false);
	wMButton20->setPressedArg("setLayout", 0x0, "文泉驿微米黑", 16, 0);
	wMButton20->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton20->setReleasedArg("setLayout", 0x0, "文泉驿微米黑", 12, 0);
	wMButton20->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton20->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton20_clk_cb);

	/*----------------------------- Button : wMButton22                  -----------------------------*/
	wMButton22 = new STTButton(p_rt, this, "wMButton22", 0);
	wMButton22->setMainArg(301, 100, 98, 48, false);
	wMButton22->setPressedArg("setAlign", 0x0, "文泉驿微米黑", 16, 0);
	wMButton22->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton22->setReleasedArg("setAlign", 0x0, "文泉驿微米黑", 12, 0);
	wMButton22->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton22->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton22_clk_cb);

	/*----------------------------- Button : wMButton23                  -----------------------------*/
	wMButton23 = new STTButton(p_rt, this, "wMButton23", 0);
	wMButton23->setMainArg(401, 100, 98, 48, false);
	wMButton23->setPressedArg("align", 0x0, "文泉驿微米黑", 16, 0);
	wMButton23->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton23->setReleasedArg("align", 0x0, "文泉驿微米黑", 12, 0);
	wMButton23->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton23->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton23_clk_cb);

	/*----------------------------- Button : wMButton24                  -----------------------------*/
	wMButton24 = new STTButton(p_rt, this, "wMButton24", 0);
	wMButton24->setMainArg(501, 100, 98, 48, false);
	wMButton24->setPressedArg("alignTo", 0x0, "文泉驿微米黑", 16, 0);
	wMButton24->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton24->setReleasedArg("alignTo", 0x0, "文泉驿微米黑", 12, 0);
	wMButton24->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton24->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton24_clk_cb);

	/*----------------------------- Button : wMButton25                  -----------------------------*/
	wMButton25 = new STTButton(p_rt, this, "wMButton25", 0);
	wMButton25->setMainArg(601, 100, 98, 48, false);
	wMButton25->setPressedArg("center", 0x0, "文泉驿微米黑", 16, 0);
	wMButton25->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton25->setReleasedArg("center", 0x0, "文泉驿微米黑", 12, 0);
	wMButton25->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton25->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton25_clk_cb);

	/*----------------------------- Button : wMButton26                  -----------------------------*/
	wMButton26 = new STTButton(p_rt, this, "wMButton26", 0);
	wMButton26->setMainArg(701, 100, 98, 48, false);
	wMButton26->setPressedArg("getCoords", 0x0, "文泉驿微米黑", 16, 0);
	wMButton26->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton26->setReleasedArg("getCoords", 0x0, "文泉驿微米黑", 12, 0);
	wMButton26->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton26->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton26_clk_cb);

	/*----------------------------- Button : wMButton27                  -----------------------------*/
	wMButton27 = new STTButton(p_rt, this, "wMButton27", 0);
	wMButton27->setMainArg(801, 100, 98, 48, false);
	wMButton27->setPressedArg("moveTo", 0x0, "文泉驿微米黑", 16, 0);
	wMButton27->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton27->setReleasedArg("moveTo", 0x0, "文泉驿微米黑", 12, 0);
	wMButton27->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton27->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton27_clk_cb);

	/*----------------------------- Button : wMButton29                  -----------------------------*/
	wMButton29 = new STTButton(p_rt, this, "wMButton29", 0);
	wMButton29->setMainArg(901, 100, 98, 48, false);
	wMButton29->setPressedArg("setExtClickArea", 0x0, "文泉驿微米黑", 16, 0);
	wMButton29->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton29->setReleasedArg("setExtClickArea", 0x0, "文泉驿微米黑", 12, 0);
	wMButton29->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton29->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton29_clk_cb);

	/*----------------------------- Button : wMButton30                  -----------------------------*/
	wMButton30 = new STTButton(p_rt, this, "wMButton30", 0);
	wMButton30->setMainArg(101, 149, 98, 48, false);
	wMButton30->setPressedArg("del", 0x0, "文泉驿微米黑", 16, 0);
	wMButton30->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton30->setReleasedArg("del", 0x0, "文泉驿微米黑", 12, 0);
	wMButton30->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton30->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton30_clk_cb);

	/*----------------------------- Button : wMButton31                  -----------------------------*/
	wMButton31 = new STTButton(p_rt, this, "wMButton31", 0);
	wMButton31->setMainArg(201, 149, 98, 48, false);
	wMButton31->setPressedArg("clean", 0x0, "文泉驿微米黑", 16, 0);
	wMButton31->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton31->setReleasedArg("clean", 0x0, "文泉驿微米黑", 12, 0);
	wMButton31->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton31->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton31_clk_cb);

	/*----------------------------- Button : wMButton32                  -----------------------------*/
	wMButton32 = new STTButton(p_rt, this, "wMButton32", 0);
	wMButton32->setMainArg(301, 149, 98, 48, false);
	wMButton32->setPressedArg("moveToIndex", 0x0, "文泉驿微米黑", 16, 0);
	wMButton32->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton32->setReleasedArg("moveToIndex", 0x0, "文泉驿微米黑", 12, 0);
	wMButton32->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton32->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton32_clk_cb);

	/*----------------------------- Button : wMButton33                  -----------------------------*/
	wMButton33 = new STTButton(p_rt, this, "wMButton33", 0);
	wMButton33->setMainArg(401, 149, 98, 48, false);
	wMButton33->setPressedArg("opAnimObj", 0x0, "文泉驿微米黑", 16, 0);
	wMButton33->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton33->setReleasedArg("opAnimObj", 0x0, "文泉驿微米黑", 12, 0);
	wMButton33->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton33->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton33_clk_cb);

	/*----------------------------- Button : wMButton34                  -----------------------------*/
	wMButton34 = new STTButton(p_rt, this, "wMButton34", 0);
	wMButton34->setMainArg(501, 149, 98, 48, false);
	wMButton34->setPressedArg("opVisibleObj", 0x0, "文泉驿微米黑", 16, 0);
	wMButton34->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton34->setReleasedArg("opVisibleObj", 0x0, "文泉驿微米黑", 12, 0);
	wMButton34->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton34->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton34_clk_cb);

	/*----------------------------- Button : wMButton35                  -----------------------------*/
	wMButton35 = new STTButton(p_rt, this, "wMButton35", 0);
	wMButton35->setMainArg(601, 149, 98, 48, false);
	wMButton35->setPressedArg("opEnableObj", 0x0, "文泉驿微米黑", 16, 0);
	wMButton35->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton35->setReleasedArg("opEnableObj", 0x0, "文泉驿微米黑", 12, 0);
	wMButton35->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton35->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton35_clk_cb);

	/*----------------------------- Button : wMButton36                  -----------------------------*/
	wMButton36 = new STTButton(p_rt, this, "wMButton36", 0);
	wMButton36->setMainArg(701, 149, 98, 48, false);
	wMButton36->setPressedArg("opFlickObj", 0x0, "文泉驿微米黑", 16, 0);
	wMButton36->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton36->setReleasedArg("opFlickObj", 0x0, "文泉驿微米黑", 12, 0);
	wMButton36->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton36->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton36_clk_cb);

	/*----------------------------- Button : wMButton37                  -----------------------------*/
	wMButton37 = new STTButton(p_rt, this, "wMButton37", 0);
	wMButton37->setMainArg(801, 149, 98, 48, false);
	wMButton37->setPressedArg("setAuth", 0x0, "文泉驿微米黑", 16, 0);
	wMButton37->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton37->setReleasedArg("setAuth", 0x0, "文泉驿微米黑", 12, 0);
	wMButton37->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton37->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton37_clk_cb);

	/*----------------------------- Button : wMButton38                  -----------------------------*/
	wMButton38 = new STTButton(p_rt, this, "wMButton38", 0);
	wMButton38->setMainArg(901, 149, 98, 48, false);
	wMButton38->setPressedArg("authorize", 0x0, "文泉驿微米黑", 16, 0);
	wMButton38->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton38->setReleasedArg("authorize", 0x0, "文泉驿微米黑", 12, 0);
	wMButton38->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton38->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton38_clk_cb);

	/*----------------------------- Button : wMButton39                  -----------------------------*/
	wMButton39 = new STTButton(p_rt, this, "wMButton39", 0);
	wMButton39->setMainArg(101, 198, 98, 48, false);
	wMButton39->setPressedArg("setBeep", 0x0, "文泉驿微米黑", 16, 0);
	wMButton39->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton39->setReleasedArg("setBeep", 0x0, "文泉驿微米黑", 12, 0);
	wMButton39->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton39->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton39_clk_cb);

	/*----------------------------- Button : wMButton40                  -----------------------------*/
	wMButton40 = new STTButton(p_rt, this, "wMButton40", 0);
	wMButton40->setMainArg(201, 198, 98, 48, false);
	wMButton40->setPressedArg("setConfirm", 0x0, "文泉驿微米黑", 16, 0);
	wMButton40->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton40->setReleasedArg("setConfirm", 0x0, "文泉驿微米黑", 12, 0);
	wMButton40->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton40->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton40_clk_cb);

	/*----------------------------- Button : wMButton41                  -----------------------------*/
	wMButton41 = new STTButton(p_rt, this, "wMButton41", 0);
	wMButton41->setMainArg(301, 198, 98, 48, false);
	wMButton41->setPressedArg("setOpLog", 0x0, "文泉驿微米黑", 16, 0);
	wMButton41->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton41->setReleasedArg("setOpLog", 0x0, "文泉驿微米黑", 12, 0);
	wMButton41->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton41->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton41_clk_cb);

	/*----------------------------- Button : wMButton42                  -----------------------------*/
	wMButton42 = new STTButton(p_rt, this, "wMButton42", 0);
	wMButton42->setMainArg(401, 198, 98, 48, false);
	wMButton42->setPressedArg("getAbsPosition", 0x0, "文泉驿微米黑", 16, 0);
	wMButton42->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton42->setReleasedArg("getAbsPosition", 0x0, "文泉驿微米黑", 12, 0);
	wMButton42->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton42->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton42_clk_cb);

	/*----------------------------- Button : wMButton43                  -----------------------------*/
	wMButton43 = new STTButton(p_rt, this, "wMButton43", 0);
	wMButton43->setMainArg(501, 198, 98, 48, false);
	wMButton43->setPressedArg("snapshotToPng", 0x0, "文泉驿微米黑", 16, 0);
	wMButton43->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton43->setReleasedArg("snapshotToPng", 0x0, "文泉驿微米黑", 12, 0);
	wMButton43->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton43->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton43_clk_cb);

	/*----------------------------- Button : wMButton44                  -----------------------------*/
	wMButton44 = new STTButton(p_rt, this, "wMButton44", 0);
	wMButton44->setMainArg(601, 198, 98, 48, false);
	wMButton44->setPressedArg("enableDrag", 0x0, "文泉驿微米黑", 16, 0);
	wMButton44->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton44->setReleasedArg("enableDrag", 0x0, "文泉驿微米黑", 12, 0);
	wMButton44->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton44->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton44_clk_cb);

	/*----------------------------- Button : wMButton45                  -----------------------------*/
	wMButton45 = new STTButton(p_rt, this, "wMButton45", 0);
	wMButton45->setMainArg(701, 198, 98, 48, false);
	wMButton45->setPressedArg("addEventCB", 0x0, "文泉驿微米黑", 16, 0);
	wMButton45->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton45->setReleasedArg("addEventCB", 0x0, "文泉驿微米黑", 12, 0);
	wMButton45->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton45->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton45_clk_cb);

	/*----------------------------- Button : wMButton46                  -----------------------------*/
	wMButton46 = new STTButton(p_rt, this, "wMButton46", 0);
	wMButton46->setMainArg(801, 198, 98, 48, false);
	wMButton46->setPressedArg("removeEventCB", 0x0, "文泉驿微米黑", 16, 0);
	wMButton46->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton46->setReleasedArg("removeEventCB", 0x0, "文泉驿微米黑", 12, 0);
	wMButton46->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton46->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton46_clk_cb);

	/*----------------------------- Button : wMButton47                  -----------------------------*/
	wMButton47 = new STTButton(p_rt, this, "wMButton47", 0);
	wMButton47->setMainArg(901, 198, 98, 48, false);
	wMButton47->setPressedArg("setFontUserData", 0x0, "文泉驿微米黑", 16, 0);
	wMButton47->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton47->setReleasedArg("setFontUserData", 0x0, "文泉驿微米黑", 12, 0);
	wMButton47->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton47->onEventHandler(Event::CLICKED, this, (EHandler) &Frm02::wMButton47_clk_cb);

	/*called after widget created.*/

	return; //createParts END
}

static STTWidget* pp = NULL;

void Frm02::onLoad() {
	pp = wMLabel1;
}

bool Frm02::onClosing() {
	return true;
}

void Frm02::onDispose() {

}

void Frm02::onMyEvent(uint16_t code, LvEvent e) {
	cout<<"onMyEvent"<<endl;
}

void Frm02::wMButton1_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton1（setMainArg）的点击事件*/
	pp = wMLabel1;
	int xx = pp->getX() + 1;
	int yy = pp->getY() + 1;
	int ww = pp->getWidth() + 1;
	int hh = pp->getHeight() + 1;
	pp->setMainArg(xx, yy, ww, hh);
	wMLabel1->middle();//label变化后需要对齐一下
}

void Frm02::wMButton2_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton2（setMainStyle）的点击事件*/
	pp = wMLabel1;
	int r = pp->getStyle()->getRadius() + 1;
	int c1 = pp->getStyle()->p_bg->getColor()* 11 / 10 + 100;
	c1 %= 0x1000000;
	int c2 = pp->getStyle()->p_bg->getGradColor()* 11 / 10 - 100;
	c2 %= 0x1000000;
	int tmp = c1;c1=c2;c2=tmp;//交换主色和渐变色
	int dir = pp->getStyle()->p_bg->getGradDir() + 1;
	dir %= 3;//[0,1,2]
	int opa = pp->getStyle()->p_bg->getOpa() + 1;
	opa %= 256;//[0..255]
	int w_border = pp->getStyle()->p_border->getWidth() + 1;
	w_border %= 10;//边框取[0..9]
	int c_border = pp->getStyle()->p_border->getColor();
	c_border = c_border * 11 / 10 + 10;
	c_border %= 0x1000000;
	int w_shadow = pp->getStyle()->p_shadow->getWidth() + 1;
	w_shadow %= 50;//边框取[0..49]
	int c_shadow = pp->getStyle()->p_shadow->getColor() * 11 / 10 + 100;
	c_shadow %= 0x1000000;
	int ss = 0;
	pp->setMainStyle(r, c1, c2, dir, opa, w_border, c_border, w_shadow, c_shadow, ss);
	wMLabel1->middle();//label变化后需要对齐一下
}

void Frm02::wMButton3_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton3（setBgImg）的点击事件*/
	pp = wMLabel1;
	pp->setBgImg("./res/pic/add.png");
}

void Frm02::wMButton4_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton4（onEventHandler）的点击事件*/
	pp = wMLabel1;
	pp->clearFlag(stt::constant::FLAG::CLICKABLE);
	pp->addFlag(stt::constant::FLAG::CLICKABLE);//标签可被点击
	pp->onEventHandler(Event::CLICKED, pp, (EHandler)&Frm02::onMyEvent);
}

void Frm02::wMButton5_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton5（bindData）的点击事件*/
	pp = wMLabel1;
	pp->bindData(_V("$time"));
}

void Frm02::wMButton6_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton6（addFlag）的点击事件*/
	pp = wMLabel1;
	pp->clearFlag(stt::constant::FLAG::CLICKABLE);//使标签不可被点击
	pp->addFlag(stt::constant::FLAG::CLICKABLE);//使标签可被点击
}

void Frm02::wMButton7_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton7（setHidden）的点击事件*/
	pp = wMLabel1;
	bool b = pp->hasFlag(stt::constant::FLAG::HIDDEN);
	pp->setHidden(!b);
}

void Frm02::wMButton8_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton8（setEnable）的点击事件*/
	pp = wMLabel1;
	pp->getStyle()->p_text->setColor(0x404040, stt::constant::WidgetState::DISABLED);//禁用状态下的文字颜色
	bool b = !pp->hasState(stt::constant::WidgetState::DISABLED);
	pp->setEnable(!b);
}

void Frm02::wMButton9_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton9（setClickable）的点击事件*/
	pp = wMLabel1;
	pp->getStyle()->p_text->setColor(0xFF0000, stt::constant::WidgetState::PRESSED); //按下状态下的文字颜色
	bool b = pp->hasFlag(stt::constant::FLAG::CLICKABLE);
	pp->setClickable(!b);
}

void Frm02::wMButton10_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton10（setScrollable）的点击事件*/
	pp = wMPanel1;
	bool b = pp->hasFlag(stt::constant::FLAG::SCROLLABLE);
	pp->getStyle()->p_scrollbar->setDir(15);
	pp->getStyle()->p_scrollbar->setMode(1);
	pp->setScrollable(!b);
}

void Frm02::wMButton11_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton11（addState）的点击事件*/
	pp = wMLabel1;
	pp->setClickable(true);
	pp->getStyle()->p_text->setColor(0xFF0000, stt::constant::WidgetState::PRESSED); //按下状态下的文字颜色
	pp->getStyle()->p_text->setColor(0x404040, stt::constant::WidgetState::DISABLED);//禁用状态下的文字颜色
	pp->addState(stt::constant::WidgetState::EDITED);
	pp->addState(stt::constant::WidgetState::FOCUSED);
	pp->addState(stt::constant::WidgetState::PRESSED);
//	pp->addState(stt::constant::WidgetState::DISABLED);
	pp->addState(stt::constant::WidgetState::CHECKED);
}

void Frm02::wMButton12_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton12（setPos）的点击事件*/
	pp = wMLabel1;
	int xx = pp->getX() + 1;
	int yy = pp->getY() + 1;
	pp->setPos(xx, yy);
}

void Frm02::wMButton13_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton13（setX）的点击事件*/
	pp = wMLabel1;
	int xx = pp->getX() + 1;
	pp->setX(xx);
}

void Frm02::wMButton14_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton13（setY）的点击事件*/
	pp = wMLabel1;
	int yy = pp->getY() + 1;
	pp->setY(yy);
}

void Frm02::wMButton15_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton15（setSize）的点击事件*/
	pp = wMLabel1;
	int ww = pp->getWidth() + 1;
	int hh = pp->getHeight() + 1;
	pp->setSize(ww,hh);
	wMLabel1->middle();//label变化后需要对齐一下
}

void Frm02::wMButton16_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton16（setWidth）的点击事件*/
	pp = wMLabel1;
	int ww = pp->getWidth() + 1;
	pp->setWidth(ww);
}

void Frm02::wMButton17_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton17（setHeight）的点击事件*/
	pp = wMLabel1;
	int hh = pp->getHeight() + 1;
	pp->setHeight(hh);
	wMLabel1->middle();//label变化后需要对齐一下
}

void Frm02::wMButton18_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton18（setContentWidth）的点击事件*/
	pp = wMLabel1;
	int cw = pp->getContentWidth() - 1;
	pp->setContentWidth(cw);
	pp->getStyle()->p_outline->setWidth(2)->setOpa(255)->setColor(0);
}

void Frm02::wMButton19_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton19（setContentHeight）的点击事件*/
	pp = wMLabel1;
	int cw = pp->getContentHeight() - 1;
	pp->setContentHeight(cw);

	pp->getStyle()->p_outline->setWidth(2)->setOpa(255)->setColor(0);
	wMLabel1->middle();//label变化后需要对齐一下
}

void Frm02::wMButton20_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton21（setLayout）的点击事件*/
	pp = wMPanel1;
	pp->setLayout(STTLayout::FlexLayout());
	STTLayout::setFlexFlow(pp, 5);//0单行模式，1单列模式，4多行模式，8反向单行模式,12反向多行模式，5多列模式,9反向单列模式，13反向多列模式
}

static int itmp = 0;
void Frm02::wMButton22_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton22（setAlign）的点击事件*/
	pp = wMLabel1;
	itmp++;
	itmp%=10;//内部对齐0~9
	//注意：这个对齐后，原坐标x,y为对齐后的偏移量
	pp->setAlign(itmp);//stt::constant::ALIGN
}

void Frm02::wMButton23_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton23（align）的点击事件*/
	pp = wMLabel1;
	itmp++;
	itmp %= 10;	//内部对齐0~9
	//注意：这个对齐可设置偏移量
	pp->align(itmp,0,0);	//stt::constant::ALIGN
}

void Frm02::wMButton24_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton24（alignTo）的点击事件*/
	pp = wMLabel2;
	itmp++;
	itmp %= 22;	//内部对齐0~9 外部对齐10~21
	//注意：这个对齐可设置偏移量
	pp->alignTo(wMLabel1,itmp, 0, 0);	//stt::constant::ALIGN
}

void Frm02::wMButton25_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton25（center）的点击事件*/
	pp = wMLabel1;
	pp->center();
}

void Frm02::wMButton26_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton26（getCoords）的点击事件*/
	pp = wMLabel1;
	LvArea a;
	pp->getCoords(&a);
	cout<<"绝对坐标"<<a.x1<<" "<<a.y1<<" "<<a.x2<<" "<<a.y2<<endl;
}

void Frm02::wMButton27_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton27（moveTo）的点击事件*/
	pp = wMLabel1;
	pp->moveTo(1, 1);
}

void Frm02::wMButton29_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton29（setExtClickArea）的点击事件*/
	pp = wMButton21;
	pp->setExtClickArea(20);
	cout<<"试试点击【click me!】按钮外侧"<<endl;
}

void Frm02::wMButton30_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton30（del）的点击事件*/
	pp = wMPanel1;
	pp->del();
}

void Frm02::wMButton31_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton31（clean）的点击事件*/
	pp = wMPanel1;
	pp->clean();
}

void Frm02::wMButton32_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton32（moveToIndex）的点击事件*/
	pp = wMPanel1;
	pp->setLayout(STTLayout::FlexLayout());
	STTLayout::setFlexFlow(pp, 5);
	pp = wMLabel1;
	int i = (pp->getIndex() + 1) % wMPanel1->getChildCnt();
	pp->moveToIndex(i);

}

void Frm02::wMButton33_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton33（opAnimObj）的点击事件*/
	pp = wMLabel1;
	//t=0表示文字内容(组态中暂不能设置)，大于等于k时，显示v值。如下：大于等于15时，显示"0xff0000"；大于等于30时显示"0xff00"；大于等于45时显示"0xff"。0至14未设置则为""
	pp->opAnimObj(_V("$second"), R"({"t":0,"p":[{"k":"15","v":"0xff0000"},{"k":"30","v":"0xff00"},{"k":"45","v":"0xff"}]})");
	//t=1表示文字颜色变化，大于等于k时，显示v值。如下：大于等于15时，显示红色；大于等于30时显示绿色；大于等于45时显示兰色。0至14未设置则为黑色
	//pp->opAnimObj(_V("$second"), R"({"t":1,"p":[{"k":"15","v":"0xff0000"},{"k":"30","v":"0xff00"},{"k":"45","v":"0xff"}]})");
	//t=2表示背景颜色变化，大于等于k时，显示v值。如下：大于等于15时，显示红色；大于等于30时显示绿色；大于等于45时显示兰色。0至14未设置则为黑色
	//pp->opAnimObj(_V("$second"), R"({"t":2,"p":[{"k":"15","v":"0xff0000"},{"k":"30","v":"0xff00"},{"k":"45","v":"0xff"}]})");
	//t=3表示边框颜色变化，大于等于k时，显示v值。如下：大于等于15时，显示红色；大于等于30时显示绿色；大于等于45时显示兰色。0至14未设置则为黑色
	pp->opAnimObj(_V("$second"), R"({"t":3,"p":[{"k":"15","v":"0xff0000"},{"k":"30","v":"0xff00"},{"k":"45","v":"0xff"}]})");
	//t=4表示水平移动 变量vl=0时,移动量ml为0;变量vu=59时,移动量为100
	pp->opAnimObj(_V("$second"), R"({"t":4,"p":{"ml":"0","vl":"0","mu":"100","vu":"59"}})");
	//t=5表示垂直移动 变量vl=0时,移动量ml为0;变量vu=59时,移动量为100
	pp->opAnimObj(_V("$second"), R"({"t":5,"p":{"ml":"0","vl":"0","mu":"100","vu":"59"}})");
	//t=6表示尺寸变化 变量vl=0时,宽高变化量ml为0;变量vu=59时,宽高变化量为100
	pp->opAnimObj(_V("$second"), R"({"t":6,"p":{"ml":"0","vl":"0","mu":"100","vu":"59"}})");
}

void Frm02::wMButton34_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton34（opVisibleObj）的点击事件*/
	pp = wMLabel1;
	//当变量大于30(?>30中问号表示变量，表达式使用sqlite的statement的用法)时，可见(c=1)；否则不可见
	pp->opVisibleObj(_V("$second"), R"({"p":"?>30","c":"1"})");
}

void Frm02::wMButton35_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton35（opEnableObj）的点击事件*/
	pp = wMButton21;
	pp->getStyle()->p_text->setColor(0xff0000, stt::constant::WidgetState::DISABLED);//禁用时文字为红色
	//当变量大于30(?>30中问号表示变量，表达式使用sqlite的statement的用法)时，不禁用(c=0)；否则禁用
	pp->opEnableObj(_V("$second"), R"({"p":"?>30","c":"0"})");
}

void Frm02::wMButton36_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton36（opFlickObj）的点击事件*/
	pp = wMLabel1;
	//当m为1时p有效。p表示用颜色闪烁(k表示用什么颜色，gc为背景色,bc为边框色,fc为文字色)
	//当m=0时p无效，闪烁是能过可见/不可见实现
	//s 为闪烁速度0慢 1中 2快
	//x 为变量比较条件，表达式可使用sqlite的statement的用法
	//c 为0，表示满足条件x时不闪烁，不满足则闪烁
	pp->opFlickObj(_V("$second"), R"({"p":[{"k":"gc","v":"0xffff80"}],"c":"1","s":"1","x":"?>=30","m":"1"})");
	pp->opFlickObj(_V("$second"), R"({"p":[{"k":"gc","v":"0xffff80"}],"c":"0","s":"1","x":"?>=30","m":"1"})");
	pp->opFlickObj(_V("$second"), R"({"p":[{"k":"gc","v":"0xffff80"},{"k":"bc","v":"0xff"},{"k":"fc","v":"0xff0000"}],"c":"1","s":"1","x":"?>=30","m":"1"})");
}

void Frm02::wMButton37_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton37（setAuth）的点击事件*/
	pp = wMButton21;
	//第1个参数无意义，第2个参数为组编号，用,分隔。组编号可以在修改组时看到
	pp->setAuth(true, "2,4");
}

void Frm02::wMButton38_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton38（authorize）的点击事件*/
	pp = wMButton21;
	pp->setAuth(true, "2,4");
	pp->authorize(true);//直接授权，不需要再输入用户名密码
}

void Frm02::wMButton21_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton21（click me!）的点击事件*/
	cout<<"click me!"<<endl;
}

void Frm02::wMButton39_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton39（setBeep）的点击事件*/
	pp = wMButton21;
	pp->setBeep(true);
}

void Frm02::wMButton40_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton40（setConfirm）的点击事件*/
	pp = wMButton21;
	pp->setConfirm(true,"confirm me!");//取消后，wMButton21不会响应点击事件,不会输出click me!
}

void Frm02::wMButton41_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton41（setOpLog）的点击事件*/
	pp = wMButton21;
	pp->setOpLog(true);	//可在操作日志控件中可查看 wMButton21按钮的点击记录
}

void Frm02::wMButton42_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton42（getAbsPosition）的点击事件*/
	pp = wMButton21;
	LvArea a = pp->getAbsPosition();
	cout<<"绝对坐标"<<a.x1<<" "<<a.y1<<" "<<a.x2<<" "<<a.y2<<endl;
}

void Frm02::wMButton43_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton43（snapshotToPng）的点击事件*/
	pp = wMPanel1;
	pp->snapshotToPng("./data/xxx.png", true);//尝试一下true/false的区别
}

void Frm02::wMButton44_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton44（enableDrag）的点击事件*/
	pp = wMPanel1;
	pp->enableDrag(true);
}

void myfunc(LvEvent * e) {	cout<<"myfunc"<<endl; }
void Frm02::wMButton45_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton45（addEventCB）的点击事件*/
	pp = wMButton21;
	pp->addEventCB(myfunc, stt::constant::Event::CLICKED, pp);//与onEventHandler相似。onEventHandler是传入类成员函数
}

void Frm02::wMButton46_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton46（removeEventCB）的点击事件*/
	pp = wMButton21;
	pp->removeEventCB(myfunc);
}

void Frm02::wMButton47_clk_cb(uint16_t code, LvEvent e) {
	/*wMButton47（setFontUserData）的点击事件*/
	pp = wMButton21;
	int* userdata = new int(1);//将文字锐化，要用指针，不能用局部变量
	//仔细看界面：第1个参数取到的是16号文泉驿微米黑，故所有这个字体的控件显示有变化，而12号字体是没有变化的。
	pp->setFontUserData(const_cast<void*>(pp->getStyle()->p_text->getFont()), userdata);
	this->invalidate();
}
